home *** CD-ROM | disk | FTP | other *** search
- ********** Deptrans COMMAND FILE **********
- * Applies deposits from the Getdep file against the matching invoices in the
- * Invoices file as payments are received against them.
- ****************************************************************************
- *
- GO TOP
- CLEAR
- DO WHILE .NOT. EOF()
-
- Number = STR(RECNO(),5)
- @ 6,20 SAY 'RECORD NUMBER '+Number
- @ 7, 0 CLEAR
- *
- IF Inv_Nmbr=' ' .OR. DELETED()
- SKIP
- ELSE
- @ 7,20 SAY 'INVOICE NUMBER '+Inv_Nmbr
- Key = Inv_Nmbr
- Decision = SPACE(0)
- *
- SELECT 10
- FIND &Key
- Again = .T.
- IF RECNO() = 0
- DO WHILE Again
- @ 9,15 SAY 'THIS INVOICE NUMBER IS NOT IN THE INVOICE FILE. '
- @ 11,15 SAY ' Any key to EDIT '
- @ 12,15 SAY ' Press <ENTER> to continue.'
- WAIT ' ' TO Decision
- *
- IF LEN(Decision) <> 0
- CLEAR
- SELECT 1
- @ 6,0 SAY ' Entry '+STR(RECNO(),5)
- @ 8,0 SAY ' HOW MUCH' GET Deposit
- @ 9,0 SAY 'OUR INVOICE NO' GET Inv_Nmbr
- @ 10,0 SAY ' CHECK FROM' GET Payer PICTURE ;
- '!!!!!!!!!!!!!!!!!!!!'
- @ 11,0 SAY 'THEIR CHECK NO' GET Pay_Nmbr PICTURE '!!!!!!!'
- @ 12,0 SAY ' Comments' GET Comments PICTURE ;
- '!!!!!!!!!!!!!!!!!!!!'
- READ
- SELECT 10
- Again = .F.
- ELSE
- Again = .F.
- ENDIF
- ENDDO Again
- ELSE
- REPLACE Amt_Rcd WITH (Amt_Rcd + A->Deposit), Date_Rcd WITH A->Dep_Date
- ENDIF 0
- SELECT 1
- *
- * We do not skip to the next record if the record was edited. This
- * allows us to run the edited record through the process again.
- IF LEN(Decision) = 0
- SKIP
- ENDIF
- ENDIF no invoice number or record deleted
- ENDDO the transfer
- RETURN